﻿using System;
using CuteRibs.MVVMLib;
using Newtonsoft.Json;

namespace CuteRibs.WowArmory.Models
{
	#region CharacterBrief
	/// <summary>
	/// {
	///		"charName": "夜舞风暴",
	///		"region": "亚雷戈斯",
	///		"battlegroup": "Battle Group 16",
	///		"class": 11,
	///		"race": 6,
	///		"gender": 0,
	///		"level": 85,
	///		"achievementPoints": 5980,
	///		"thumbnail": "arygos/26/133658-avatar.jpg"
	///	}
	/// </summary>
	[JsonObject]
	public class Character : BNObjectBase
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("realm")]
		public string Realm { get; set; }

		[JsonProperty("battlegroup")]
		public string Battlegroup { get; set; }

		[JsonProperty("class")]
		public int Class { get; set; }

		[JsonProperty("race")]
		public int Race { get; set; }

		[JsonProperty("gender")]
		public int Gender { get; set; }

		[JsonProperty("level")]
		public int Level { get; set; }

		[JsonProperty("achievementPoints")]
		public int AchievementPoints { get; set; }

		[JsonProperty("thumbnail")]
		public string Thumbnail { get; set; }

		private int side = -1;

		public int Side
		{
			get
			{
				if (this.side == -1)
				{
					if (this.Race == 24)
					{
						this.side = 0;
					}
					else if (this.Race.In(2, 5, 6, 8, 9, 10, 26))
					{
						this.side = 2;
					}
					else
					{
						this.side = 1;
					}
				}

				return this.side;
			}
		}
	}
	#endregion

	#region CharacterDetail
	/// <summary>
	///	{
	///		"lastModified": 1348145512000,
	///		"charName": "Kaloa",
	///		"region": "亚雷戈斯",
	///		"battlegroup": "Battle Group 16",
	///		"class": 3,
	///		"race": 8,
	///		"gender": 0,
	///		"level": 85,
	///		"achievementPoints": 11855,
	///		"thumbnail": "arygos/45/10401837-avatar.jpg",
	///		"calcClass": "Y",
	///		"achievements": {},
	///		"appearance": {},
	///		"feed": [],
	///		"guild": {},
	///		"hunterPets": [],
	///		"items": {},
	///		"mounts": [],
	///		"pets": [],
	///		"petSlots": [],
	///		"professions": {},
	///		"progression": {},
	///		"pvp": {},
	///		"quests": []
	///		"reputation": [],
	///		"stats": {},
	///		"talents": [],
	///		"titles": [],
	///	}
	/// </summary>
	[JsonObject]
	public class CharacterDetail : Character
	{
		private string profileId;

		public string ProfileId
		{
			get
			{
				if (this.profileId == null)
				{
					this.profileId = this.Thumbnail.Remove(this.Thumbnail.IndexOf('-'));
				}

				return this.profileId;
			}
		}

		//"lastModified": 1348145512000
		[JsonProperty("lastModified")]
		[JsonConverter(typeof(BNDateTimeConverter))]
		public DateTime LastModified { get; set; }

		//"calcClass": "Y"
		[JsonProperty("calcClass")]
		public string CalcClass { get; set; }

		#region fields

		//"achievements": {}
		[JsonProperty("achievements")]
		public CompletedAchievements Achievements { get; set; }

		//"appearance": {}
		[JsonProperty("appearance")]
		public CharAppearance Appearance { get; set; }

		//"feed": []
		[JsonProperty("feed")]
		public CharFeed[] Feed { get; set; }

		//"guild": {}
		[JsonProperty("guild")]
		public Guild Guild { get; set; }

		//"hunterPets": []
		[JsonProperty("hunterPets")]
		public HunterPet[] HunterPets { get; set; }

		//"items": {}
		[JsonProperty("items")]
		public CharItems Items { get; set; }

		//"mounts": []
		[JsonProperty("mounts")]
		public int[] Mounts { get; set; }

		//"pets": []
		[JsonProperty("pets")]
		public CharPets Pets { get; set; }

		//"petSlots": []
		[JsonProperty("petSlots")]
		public int[] PetSlots { get; set; }

		//"professions": {}
		[JsonProperty("professions")]
		public CharProfessions Professions { get; set; }

		//"progression": {}
		[JsonProperty("progression")]
		public CharProgression Progression { get; set; }

		//"pvp": {}
		[JsonProperty("pvp")]
		public CharPvp Pvp { get; set; }

		//"quests": []
		[JsonProperty("quests")]
		public int[] Quests { get; set; }

		//"reputation": []
		[JsonProperty("reputation")]
		public CharReputation[] Reputations { get; set; }

		//"stats": {}
		[JsonProperty("stats")]
		public CharStats Stats { get; set; }

		//"talents": []
		[JsonProperty("talents")]
		public Talent[] Talents { get; set; }

		//"titles": []
		[JsonProperty("titles")]
		public CharTitle[] Titles { get; set; }

		#endregion
	}
	#endregion

	#region CharAppearance
	/// <summary>
	/// {
	///		"faceVariation": 3,
	///		"skinColor": 6,
	///		"hairVariation": 2,
	///		"hairColor": 1,
	///		"featureVariation": 0,
	///		"showHelm": true,
	///		"showCloak": true
	///	}
	/// </summary>
	[JsonObject]
	public class CharAppearance
	{
		[JsonProperty("faceVariation")]
		public int FaceVariation { get; set; }

		[JsonProperty("skinColor")]
		public int SkinColor { get; set; }

		[JsonProperty("hairVariation")]
		public int HairVariation { get; set; }

		[JsonProperty("hairColor")]
		public int HairColor { get; set; }

		[JsonProperty("featureVariation")]
		public int FeatureVariation { get; set; }

		[JsonProperty("showHelm")]
		public bool ShowHelm { get; set; }

		[JsonProperty("showCloak")]
		public bool ShowCloak { get; set; }
	}
	#endregion

	#region CharFeed
	/// <summary>
	/// {
	///		"type": "BOSSKILL",
	///		"timestamp": 1333545603000,
	///		"itemId": 78814
	///		"achievement": {},
	///		"featOfStrength": false,
	///		"criteria": {},
	///		"quantity": 7,
	///		"charName": "不眠的约萨希"
	///	}
	/// </summary>
	[JsonObject]
	public class CharFeed
	{
		[JsonProperty("type")]
		public string Type { get; set; }

		[JsonProperty("timestamp")]
		[JsonConverter(typeof(BNDateTimeConverter))]
		public DateTime Timestamp { get; set; }

		[JsonProperty("itemId")]
		public int ItemId { get; set; }

		[JsonProperty("achievement")]
		public Achievement Achievement { get; set; }

		[JsonProperty("featOfStrength")]
		public bool FeatOfStrength { get; set; }

		[JsonProperty("criteria")]
		public Criteria Criteria { get; set; }

		[JsonProperty("quantity")]
		public int Quantity { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }
	}
	#endregion

	#region CharItems
	/// <summary>
	///	{
	///		"averageItemLevel": 388,
	///		"averageItemLevelEquipped": 412,
	///		"head": {},
	///		"neck": {},
	///		"shoulder": {},
	///		"back": {},
	///		"chest": {},
	///		"tabard": {},
	///		"wrist": {},
	///		"hands": {},
	///		"waist": {},
	///		"legs": {},
	///		"feet": {},
	///		"finger1": {},
	///		"finger2": {},
	///		"trinket1": {},
	///		"trinket2": {},
	///		"mainHand": {},
	///		"offHand": {}
	///	}
	/// </summary>
	[JsonObject]
	public class CharItems
	{
		[JsonProperty("averageItemLevel")]
		public int AverageItemLevel { get; set; }

		[JsonProperty("averageItemLevelEquipped")]
		public int AverageItemLevelEquipped { get; set; }

		[JsonProperty("head")]
		[ItemSlot(ItemSlot.Head)]
		public Item Head { get; set; }

		[JsonProperty("neck")]
		[ItemSlot(ItemSlot.Neck)]
		public Item Neck { get; set; }

		[JsonProperty("shoulder")]
		[ItemSlot(ItemSlot.Shoulder)]
		public Item Shoulder { get; set; }

		[JsonProperty("back")]
		[ItemSlot(ItemSlot.Back)]
		public Item Back { get; set; }

		[JsonProperty("chest")]
		[ItemSlot(ItemSlot.Chest)]
		public Item Chest { get; set; }

		[JsonProperty("tabard")]
		[ItemSlot(ItemSlot.Tabard)]
		public Item Tabard { get; set; }

		[JsonProperty("wrist")]
		[ItemSlot(ItemSlot.Wrist)]
		public Item Wrist { get; set; }

		[JsonProperty("hands")]
		[ItemSlot(ItemSlot.Hands)]
		public Item Hands { get; set; }

		[JsonProperty("waist")]
		[ItemSlot(ItemSlot.Waist)]
		public Item Waist { get; set; }

		[JsonProperty("legs")]
		[ItemSlot(ItemSlot.Legs)]
		public Item Legs { get; set; }

		[JsonProperty("feet")]
		[ItemSlot(ItemSlot.Feet)]
		public Item Feet { get; set; }

		[JsonProperty("finger1")]
		[ItemSlot(ItemSlot.Finger1)]
		public Item Finger1 { get; set; }

		[JsonProperty("finger2")]
		[ItemSlot(ItemSlot.Finger2)]
		public Item Finger2 { get; set; }

		[JsonProperty("trinket1")]
		[ItemSlot(ItemSlot.Trinket1)]
		public Item Trinket1 { get; set; }

		[JsonProperty("trinket2")]
		[ItemSlot(ItemSlot.Trinket2)]
		public Item Trinket2 { get; set; }

		[JsonProperty("mainHand")]
		[ItemSlot(ItemSlot.MainHand)]
		public Item MainHand { get; set; }

		[JsonProperty("offHand")]
		[ItemSlot(ItemSlot.OffHand)]
		public Item OffHand { get; set; }

		[JsonProperty("ranged")]
		[ItemSlot(ItemSlot.Ranged)]
		public Item Ranged { get; set; }
	}
	#endregion

	#region CharMounts
	/// <summary>
	///	{
	///		"numCollected": 52,
	///		"numNotCollected": 413,
	///		"collected": []
	///	}
	/// </summary>
	[JsonObject]
	public class CharMounts
	{
		[JsonProperty("numCollected")]
		public short NumCollected { get; set; }

		[JsonProperty("numNotCollected")]
		public short NumNotCollected { get; set; }

		[JsonProperty("collected")]
		public Mount[] Collected { get; set; }
	}
	#endregion

	#region CharPets
	/// <summary>
	///	{
	///		"numCollected": 52,
	///		"numNotCollected": 413,
	///		"collected": []
	///	}
	/// </summary>
	[JsonObject]
	public class CharPets
	{
		[JsonProperty("numCollected")]
		public short NumCollected { get; set; }

		[JsonProperty("numNotCollected")]
		public short NumNotCollected { get; set; }

		[JsonProperty("collected")]
		public Pet[] Collected { get; set; }
	}
	#endregion

	#region CharProfessions
	/// <summary>
	/// {
	///		"primary": [],
	///		"secondary": []
	///	}
	/// </summary>
	[JsonObject]
	public class CharProfessions
	{
		[JsonProperty("primary")]
		public Profession[] primary { get; set; }

		[JsonProperty("secondary")]
		public Profession[] secondary { get; set; }
	}
	#endregion

	#region CharProgression
	/// <summary>
	/// {
	///		"raids": []
	///	}
	/// </summary>
	[JsonObject]
	public class CharProgression
	{
		[JsonProperty("raids")]
		public Raid[] Raids { get; set; }
	}
	#endregion

	#region CharPvp
	/// <summary>
	/// {
	///		"ratedBattlegrounds": {},
	///		"arenaTeams": [],
	///		"totalHonorableKills": 0
	///	}
	/// </summary>
	[JsonObject]
	public class CharPvp
	{
		[JsonProperty("ratedBattlegrounds")]
		public CharRatedBattlegrounds RatedBattlegrounds { get; set; }

		[JsonProperty("arenaTeams")]
		public CharArenaTeam[] ArenaTeams { get; set; }

		[JsonProperty("totalHonorableKills")]
		public int TotalHonorableKills { get; set; }
	}
	#endregion

	#region CharReputation
	/// <summary>
	/// {
	///		"id": 1098,
	///		"charName": "黑锋骑士团",
	///		"standing": 7,
	///		"value": 999,
	///		"max": 999
	///	}
	/// </summary>
	[JsonObject]
	public class CharReputation
	{
		[JsonProperty("id")]
		public int Id { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("standing")]
		public int Standing { get; set; }

		[JsonProperty("value")]
		public int Value { get; set; }

		[JsonProperty("max")]
		public int Max { get; set; }
	}
	#endregion

	#region CharStats
	/// <summary>
	///	{
	///	    "health":155263,
	///	    "powerType":"mana",
	///	    "power":24732,
	///	    "str":3395,
	///	    "agi":142,
	///	    "sta":8017,
	///	    "int":106,
	///	    "spr":117,
	///	    "attackPower":7025,
	///	    "rangedAttackPower":0,
	///	    "mastery":23.26104,
	///	    "masteryRating":2736,
	///	    "crit":1.351225,
	///	    "critRating":0,
	///	    "hitRating":58,
	///	    "hasteRating":0,
	///	    "expertiseRating":238,
	///	    "spellPower":2133,
	///	    "spellPen":0,
	///	    "spellCrit":3.498852,
	///	    "spellCritRating":0,
	///	    "mana5":1191.0,
	///	    "mana5Combat":1170.0,
	///	    "armor":36505,
	///	    "dodge":12.206712,
	///	    "dodgeRating":1565,
	///	    "parry":13.33957,
	///	    "parryRating":1614,
	///	    "block":57.335938,
	///	    "blockRating":0,
	///		"pvpResilience": 41.03851,
	///		"pvpResilienceRating": 322,
	///	    "mainHandDmgMin":2146.0,
	///	    "mainHandDmgMax":2868.0,
	///	    "mainHandSpeed":2.6,
	///	    "mainHandDps":964.1704,
	///	    "mainHandExpertise":10,
	///	    "offHandDmgMin":0.0,
	///	    "offHandDmgMax":0.0,
	///	    "offHandSpeed":2.0,
	///	    "offHandDps":0.0,
	///	    "offHandExpertise":7,
	///	    "rangedDmgMin":-1.0,
	///	    "rangedDmgMax":-1.0,
	///	    "rangedSpeed":-1.0,
	///	    "rangedDps":-1.0,
	///	    "rangedCrit":1.351225,
	///	    "rangedCritRating":0,
	///		"rangedHitPercent": 0,
	///		"rangedHitRating": 0,
	///		"pvpPower": 0,
	///		"pvpPowerRating": 0
	///	}
	/// </summary>
	[JsonObject]
	public class CharStats
	{
		[JsonProperty("health")]
		public long Health { get; set; }

		[JsonProperty("powerType")]
		public string PowerType { get; set; }

		[JsonProperty("power")]
		public long Power { get; set; }

		[JsonProperty("str")]
		public int Str { get; set; }

		[JsonProperty("agi")]
		public int Agi { get; set; }

		[JsonProperty("sta")]
		public int Sta { get; set; }

		[JsonProperty("int")]
		public int Int { get; set; }

		[JsonProperty("spr")]
		public int Spr { get; set; }

		[JsonProperty("attackPower")]
		public int AttackPower { get; set; }

		[JsonProperty("rangedAttackPower")]
		public int RangedAttackPower { get; set; }

		[JsonProperty("mastery")]
		public float Mastery { get; set; }

		[JsonProperty("masteryRating")]
		public int MasteryRating { get; set; }

		[JsonProperty("crit")]
		public float Crit { get; set; }

		[JsonProperty("critRating")]
		public int CritRating { get; set; }

		[JsonProperty("hitPercent")]
		public float HitPercent { get; set; }

		[JsonProperty("hitRating")]
		public int HitRating { get; set; }

		[JsonProperty("hasteRating")]
		public int HasteRating { get; set; }

		[JsonProperty("expertiseRating")]
		public int ExpertiseRating { get; set; }

		[JsonProperty("spellPower")]
		public int SpellPower { get; set; }

		[JsonProperty("spellPen")]
		public int SpellPen { get; set; }

		[JsonProperty("spellCrit")]
		public float SpellCrit { get; set; }

		[JsonProperty("spellCritRating")]
		public int SpellCritRating { get; set; }

		[JsonProperty("spellHitPercent")]
		public float SpellHitPercent { get; set; }

		[JsonProperty("spellHitRating")]
		public int SpellHitRating { get; set; }

		[JsonProperty("mana5")]
		public float Mana5 { get; set; }

		[JsonProperty("mana5Combat")]
		public float Mana5Combat { get; set; }

		[JsonProperty("armor")]
		public int Armor { get; set; }

		[JsonProperty("dodge")]
		public float Dodge { get; set; }

		[JsonProperty("dodgeRating")]
		public int DodgeRating { get; set; }

		[JsonProperty("parry")]
		public float Parry { get; set; }

		[JsonProperty("parryRating")]
		public int ParryRating { get; set; }

		[JsonProperty("block")]
		public float Block { get; set; }

		[JsonProperty("blockRating")]
		public int BlockRating { get; set; }

		[JsonProperty("pvpResilience")]
		public float PvpResilience { get; set; }

		[JsonProperty("pvpResilienceRating")]
		public int PvpResilienceRating { get; set; }

		[JsonProperty("mainHandDmgMin")]
		public float MainHandDmgMin { get; set; }

		[JsonProperty("mainHandDmgMax")]
		public float MainHandDmgMax { get; set; }

		[JsonProperty("mainHandSpeed")]
		public float MainHandSpeed { get; set; }

		[JsonProperty("mainHandDps")]
		public float MainHandDps { get; set; }

		[JsonProperty("mainHandExpertise")]
		public float MainHandExpertise { get; set; }

		[JsonProperty("offHandDmgMin")]
		public float OffHandDmgMin { get; set; }

		[JsonProperty("offHandDmgMax")]
		public float OffHandDmgMax { get; set; }

		[JsonProperty("offHandSpeed")]
		public float OffHandSpeed { get; set; }

		[JsonProperty("offHandDps")]
		public float OffHandDps { get; set; }

		[JsonProperty("offHandExpertise")]
		public float OffHandExpertise { get; set; }

		[JsonProperty("rangedDmgMin")]
		public float RangedDmgMin { get; set; }

		[JsonProperty("rangedDmgMax")]
		public float RangedDmgMax { get; set; }

		[JsonProperty("rangedSpeed")]
		public float RangedSpeed { get; set; }

		[JsonProperty("rangedDps")]
		public float RangedDps { get; set; }

		[JsonProperty("rangedCrit")]
		public float RangedCrit { get; set; }

		[JsonProperty("rangedCritRating")]
		public int RangedCritRating { get; set; }

		[JsonProperty("rangedHitPercent")]
		public float RangedHitPercent { get; set; }

		[JsonProperty("rangedHitRating")]
		public int RangedHitRating { get; set; }

		[JsonProperty("pvpPower")]
		public float PvpPower { get; set; }

		[JsonProperty("pvpPowerRating")]
		public int PvpPowerRating { get; set; }
	}
	#endregion

	#region CharTalents
	/// <summary>
	/// {
	///		"selected": true,
	///		"talents": [],
	///		"glyphs": {},
	///		"spec": {},
	///		"calcTalent": "20212.",
	///		"calcSpec": "Y",
	///		"calcGlyph": "egVu"
	///	}
	/// </summary>
	[JsonObject]
	public class CharTalents
	{
		[JsonProperty("selected")]
		public bool Selected { get; set; }

		[JsonProperty("talents")]
		public Talent[] Talents { get; set; }

		[JsonProperty("glyphs")]
		public CharGlyphs Glyphs { get; set; }

		[JsonProperty("spec")]
		public TalentSpec Spec { get; set; }

		[JsonProperty("calcTalent")]
		public string CalcTalent { get; set; }

		[JsonProperty("calcSpec")]
		public string CalcSpec { get; set; }

		[JsonProperty("calcGlyph")]
		public string CalcGlyph { get; set; }

		#region CharGlyphs
		/// <summary>
		/// {
		///		"major": [],
		///		"minor": []
		///	}
		/// </summary>
		[JsonObject]
		public class CharGlyphs
		{
			[JsonProperty("major")]
			public GlyphItem[] Major { get; set; }

			[JsonProperty("minor")]
			public GlyphItem[] Minor { get; set; }
		}
		#endregion
	}
	#endregion

	#region CharTitle
	/// <summary>
	/// {
	///		"id": 64,
	///		"charName": "%s, 阿达尔之手",
	///		"selected": true
	///	}
	/// </summary>
	[JsonObject]
	public class CharTitle
	{
		[JsonProperty("id")]
		public int Id { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("selected")]
		public bool selected { get; set; }
	}
	#endregion

	#region CharRatedBattlegrounds
	/// <summary>
	/// {
	///		"personalRating": 0,
	///		"battlegrounds": []
	///	}
	/// </summary>
	[JsonObject]
	public class CharRatedBattlegrounds
	{
		[JsonProperty("personalRating")]
		public int PersonalRating { get; set; }

		[JsonProperty("battlegrounds")]
		public Battleground[] Battlegrounds { get; set; }
	}
	#endregion

	#region CharArenaTeam
	/// <summary>
	/// {
	///		"charName": "职业混分",
	///		"personalRating": 0,
	///		"teamRating": 0,
	///		"size": "5v5"
	///	}
	/// </summary>
	[JsonObject]
	public class CharArenaTeam
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("personalRating")]
		public int PersonalRating { get; set; }

		[JsonProperty("teamRating")]
		public int TeamRating { get; set; }

		[JsonProperty("size")]
		public string Size { get; set; }
	}
	#endregion

	#region TooltipParams
	/// <summary>
	/// {
	///		"gem0": 68780,
	///		"gem1": 52207,
	///		"gem2": 52207,
	///		"enchant": 4207,
	///		"set": [ 78798, 78845, 76346, 78777 ],
	///		"reforge": 141,
	///		"transmogItem": 31064
	///	}
	/// </summary>
	[JsonObject]
	public class TooltipParams
	{
		[JsonProperty("gem0")]
		public int Gem0 { get; set; }

		[JsonProperty("gem1")]
		public int Gem1 { get; set; }

		[JsonProperty("gem2")]
		public int Gem2 { get; set; }

		[JsonProperty("enchant")]
		public int Enchant { get; set; }

		[JsonProperty("set")]
		public int[] Set { get; set; }

		[JsonProperty("reforge")]
		public int Reforge { get; set; }

		[JsonProperty("transmogItem")]
		public int transmogItem { get; set; }
	}
	#endregion

	#region Profession
	/// <summary>
	/// {
	///		"id": 171,
	///		"charName": "炼金术",
	///		"icon": "trade_alchemy",
	///		"rank": 525,
	///		"max": 525,
	///		"recipes": []
	///	}
	/// </summary>
	[JsonObject]
	public class Profession
	{
		[JsonProperty("id")]
		public int Id { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("icon")]
		public string Icon { get; set; }

		[JsonProperty("rank")]
		public int Rank { get; set; }

		[JsonProperty("max")]
		public int Max { get; set; }

		[JsonProperty("recipes")]
		public int[] Recipes { get; set; }
	}
	#endregion

	#region TalentSpec
	/// <summary>
	/// {
	///		"charName": "恢复",
	///		"role": "HEALING",
	///		"backgroundImage": "bg-druid-restoration",
	///		"icon": "spell_nature_healingtouch",
	///		"description": "使用持续性治疗法术来维持盟友的生命。",
	///		"order": 3
	///	}
	/// </summary>
	[JsonObject]
	public class TalentSpec
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("role")]
		public string Role { get; set; }

		[JsonProperty("backgroundImage")]
		public string BackgroundImage { get; set; }

		[JsonProperty("icon")]
		public string Icon { get; set; }

		[JsonProperty("description")]
		public string Description { get; set; }

		[JsonProperty("order")]
		public int Order { get; set; }
	}
	#endregion

	#region Talent
	/// <summary>
	/// {
	///		"tier": 4,
	///		"column": 2,
	///		"spell": {}
	///	}
	/// </summary>
	[JsonObject]
	public class Talent
	{
		[JsonProperty("tier")]
		public int Tier { get; set; }

		[JsonProperty("column")]
		public int Column { get; set; }

		[JsonProperty("spell")]
		public Spell Spell { get; set; }
	}
	#endregion

	#region Spell
	/// <summary>
	/// {
	///		"id": 102401,
	///		"charName": "野性冲锋",
	///		"subtext": "Guild Perk",
	///		"icon": "spell_druid_wildcharge",
	///		"description": "飞向附近一个盟友的位置。",
	///		"range": "5-25 yd 范围",
	///		"castTime": "瞬发法术",
	///		"cooldown": "15 秒钟冷却"
	///	}
	/// </summary>
	[JsonObject]
	public class Spell
	{
		[JsonProperty("id")]
		public int Id { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("subtext")]
		public string Subtext { get; set; }

		[JsonProperty("icon")]
		public string Icon { get; set; }

		[JsonProperty("description")]
		public string Description { get; set; }

		[JsonProperty("range")]
		public string Range { get; set; }

		[JsonProperty("castTime")]
		public string CastTime { get; set; }

		[JsonProperty("cooldown")]
		public string Cooldown { get; set; }
	}
	#endregion

	#region GlyphItem
	/// <summary>
	/// {
	///		"glyph": 169,
	///		"item": 40908,
	///		"charName": "激活雕文",
	///		"icon": "spell_nature_lightning"
	///	}
	/// </summary>
	[JsonObject]
	public class GlyphItem
	{
		[JsonProperty("glyph")]
		public int Glyph { get; set; }

		[JsonProperty("item")]
		public int Item { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("icon")]
		public string Icon { get; set; }
	}
	#endregion

	#region Raid
	/// <summary>
	/// {
	///		"charName": "巨龙之魂",
	///		"normal": 2,
	///		"heroic": 0,
	///		"id": 5892,
	///		"bosses": []
	///	}
	/// </summary>
	[JsonObject]
	public class Raid
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("normal")]
		public int Normal { get; set; }

		[JsonProperty("heroic")]
		public int Heroic { get; set; }

		[JsonProperty("id")]
		public int Id { get; set; }

		[JsonProperty("bosses")]
		public Boss[] Bosses { get; set; }
	}
	#endregion

	#region Boss
	/// <summary>
	/// {
	///		"charName": "莫卓克",
	///		"normalKills": 4,
	///		"heroicKills": 0,
	///		"id": 55265
	///	}
	/// </summary>
	[JsonObject]
	public class Boss
	{
		[JsonProperty("name")]									//	"拉格纳罗斯",
		public string Name { get; set; }

		[JsonProperty("normalKills")]								//	0,
		public int NormalKills { get; set; }

		[JsonProperty("heroicKills")]								//	0,
		public int HeroicKills { get; set; }

		[JsonProperty("id")]									//	11502
		public int Id { get; set; }
	}
	#endregion

	#region Battleground
	/// <summary>
	/// {
	///		"charName": "阿拉希盆地",
	///		"played": 0,
	///		"won": 0
	///	}
	/// </summary>
	[JsonObject]
	public class Battleground
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("played")]
		public int Played { get; set; }

		[JsonProperty("won")]
		public int Won { get; set; }
	}
	#endregion

	#region HunterPet
	/// <summary>
	/// {
	///		"charName": "我不是卡布",
	///		"creature": 19459,
	///		"selected": true,
	///		"slot": 1,
	///		"spec": {},
	///		"calcSpec": "a"
	///		"familyId": 1,
	///		"familyName": "狼"
	///	}
	/// </summary>
	[JsonObject]
	public class HunterPet
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("creature")]
		public int Creature { get; set; }

		[JsonProperty("selected")]
		public bool Selected { get; set; }

		[JsonProperty("slot")]
		public int Slot { get; set; }

		[JsonProperty("spec")]
		public TalentSpec Spec { get; set; }

		[JsonProperty("calcSpec")]
		public string CalcSpec { get; set; }

		[JsonProperty("familyId")]
		public string FamilyId { get; set; }

		[JsonProperty("familyName")]
		public string FamilyName { get; set; }
	}
	#endregion

	#region Mount
	/// <summary>
	/// {
	///		"charName": "乌鸦之神",
	///		"spellId": 41252,
	///		"creatureId": 23408,
	///		"itemId": 32768,
	///		"qualityId": 4,
	///		"icon": "inv-mount_raven_54",
	///		"isGround": true,
	///		"isFlying": false,
	///		"isAquatic": true,
	///		"isJumping": true
	///	}
	/// </summary>
	[JsonObject]
	public class Mount
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("spellId")]
		public int SpellId { get; set; }

		[JsonProperty("creatureId")]
		public int CreatureId { get; set; }

		[JsonProperty("itemId")]
		public int ItemId { get; set; }

		[JsonProperty("qualityId")]
		public byte QualityId { get; set; }

		[JsonProperty("icon")]
		public string Icon { get; set; }

		[JsonProperty("isGround")]
		public bool IsGround { get; set; }

		[JsonProperty("isFlying")]
		public bool IsFlying { get; set; }

		[JsonProperty("isAquatic")]
		public bool IsAquatic { get; set; }

		[JsonProperty("isJumping")]
		public bool IsJumping { get; set; }
	}
	#endregion

	#region Pet
	/// <summary>
	/// {
	///		"charName": "死亡之翼",
	///		"spellId": 98571,
	///		"creatureId": 53225,
	///		"itemId": 69821,
	///		"qualityId": 3,
	///		"icon": "inv_misc_archaeology_babypterrodax",
	///		"stats": {},
	///		"battlePetId": 1890685,
	///		"isMarked": false,
	///		"creatureName": "翼手龙宝宝",
	///		"canBattle": true
	///	}
	/// </summary>
	[JsonObject]
	public class Pet
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("spellId")]
		public int SpellId { get; set; }

		[JsonProperty("creatureId")]
		public int CreatureId { get; set; }

		[JsonProperty("itemId")]
		public int ItemId { get; set; }

		[JsonProperty("qualityId")]
		public byte QualityId { get; set; }

		[JsonProperty("icon")]
		public string Icon { get; set; }

		[JsonProperty("stats")]
		public PetStats Stats { get; set; }

		[JsonProperty("battlePetId")]
		public int BattlePetId { get; set; }

		[JsonProperty("isFavorite")]
		public bool IsFavorite { get; set; }

		[JsonProperty("creatureName")]
		public string CreatureName { get; set; }

		[JsonProperty("canBattle")]
		public bool CanBattle { get; set; }
	}
	#endregion

	#region PetStats
	/// <summary>
	/// {
	///		"speciesId": 309,
	///		"breedId": 18,
	///		"petQualityId": 3,
	///		"level": 10,
	///		"health": 522,
	///		"power": 129,
	///		"speed": 122
	///	}
	/// </summary>
	[JsonObject]
	public class PetStats
	{
		[JsonProperty("speciesId")]
		public short SpeciesId { get; set; }

		[JsonProperty("breedId")]
		public short BreedId { get; set; }

		[JsonProperty("petQualityId")]
		public short PetQualityId { get; set; }

		[JsonProperty("level")]
		public short Level { get; set; }

		[JsonProperty("health")]
		public short Health { get; set; }

		[JsonProperty("power")]
		public short Power { get; set; }

		[JsonProperty("speed")]
		public short Speed { get; set; }
	}
	#endregion

	#region GuildEmblem
	/// <summary>
	/// {
	///		"icon": 126,
	///		"iconColor": "ffdfa55a",
	///		"border": 3,
	///		"borderColor": "ff639400",
	///		"backgroundColor": "ff006391"
	///	}
	/// </summary>
	[JsonObject]
	public class GuildEmblem
	{
		[JsonProperty("icon")]
		public int Icon { get; set; }

		[JsonProperty("iconColor")]
		public string IconColor { get; set; }

		[JsonProperty("border")]
		public int Border { get; set; }

		[JsonProperty("borderColor")]
		public string BorderColor { get; set; }

		[JsonProperty("backgroundColor")]
		public string BackgroundColor { get; set; }
	}
	#endregion
}